The present invention relates, in general, to a device and method for patching code residing on a read only memory module, and especially for a device and a method for replacing defective or obsolete portions of said code in a microprocessor adapted to execute said code.
There is need to patch defective or obsolete code residing in a read only access memory by overlaying, or substituting, said code with a valid code. One prior art solution involves storing a plurality of trap addresses, each trap address pointing to a portion of an invalid code, and comparing each incoming address to the plurality of trap addresses. This prior art solution usually required a relatively expensive content addressable memory CAM for storing the plurality of trap addresses. Another solution involved storing the plurality of trap addresses in a plurality of dedicated registers. This solution is not cost effective and can usually handle only a limited number of memory patches. Another prior art solution is described in U.S. Pat. No. 5,757,690 of Mcmahon. Said patent describes an embedded ROM module with Random Access Memory RAM module valid bits for fetching code updates from an external memory. Each memory word in the ROM module is associated to a dedicated RAM bit which indicates if the content of said memory word is valid or if it there is a need in fetching a valid word from an external RAM module. This prior art solution is also memory consuming.
There is a need to provide an effective method and device for patching code residing on a read only memory module, that overcomes said disadvantages of the prior art solutions.